﻿<%@ Page Title="Send Message" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" 
	Inherits="System.Web.Mvc.ViewPage<User>" %>
<%@ Import Namespace="MindMelder.Core" %>
<%@ Import Namespace="MindMelder.Web.Controllers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <h2>Send a message to <%= Model.FullName %></h2>

	<% if (ViewContext.TempData["message"] != null){ %>
        <p><%= ViewContext.TempData["message"]%></p>
    <% } %>
    
	<%= Html.ValidationSummary() %>

	<% using (Html.BeginForm()) { %>
		<%= Html.AntiForgeryToken() %>
		<%= Html.Hidden("id", (ViewData.Model != null) ? ViewData.Model.Id : 0) %>

		<ul>
			<li>
				<label for="message">Message:</label>
				<div>
					<%= Html.TextArea("message", "") %>
				</div>
				<%= Html.ValidationMessage("message")%>
			</li>
			<li>
				<%= Html.SubmitButton("btnSend", "Send") %>
			</li>
		</ul>
	<% } %>

</asp:Content>